package com.edu.mybatis.service;

import com.edu.mybatis.mapper.TransactionalMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class TransactionalService {
    @Autowired
    private TransactionalMapper transactionalMapper;

    @Transactional
    public int deleteEmployeeById(Integer id) {
        int num = transactionalMapper.deleteEmployeeById(id);
        return num;
    }
}
